]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
cleanup: Remove unused variables
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 31 Jan 2019 14:04:56 +0000 (15:04 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Mon, 1 Jul 2019 21:44:10 +0000 (23:44 +0200)
Spotted by eslint.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/607

33 files changed:
js/gdm/loginDialog.js
js/gdm/realmd.js
js/misc/extensionUtils.js
js/misc/fileUtils.js
js/misc/objectManager.js
js/perf/core.js
js/portalHelper/main.js
js/ui/altTab.js
js/ui/appDisplay.js
js/ui/background.js
js/ui/calendar.js
js/ui/components/networkAgent.js
js/ui/ctrlAltTab.js
js/ui/dateMenu.js
js/ui/endSessionDialog.js
js/ui/extensionDownloader.js
js/ui/iconGrid.js
js/ui/keyboard.js
js/ui/lookingGlass.js
js/ui/magnifier.js
js/ui/main.js
js/ui/osdMonitorLabeler.js
js/ui/pointerA11yTimeout.js
js/ui/runDialog.js
js/ui/screenShield.js
js/ui/slider.js
js/ui/status/volume.js
js/ui/userWidget.js
js/ui/viewSelector.js
js/ui/windowManager.js
js/ui/workspace.js
js/ui/workspaceThumbnail.js
js/ui/workspacesView.js

index fe6ca9aa632e48163169f5040261accd87a15c9e..032bac6d6af3fcd300a3115d70e6adef769fc1c8 100644 (file)
@@ -187,8 +187,6 @@ var UserList = class {
     }
 
     updateStyle(isExpanded) {
-        let tasks = [];
-
         if (isExpanded)
             this._box.add_style_pseudo_class('expanded');
         else
@@ -575,19 +573,15 @@ var LoginDialog = GObject.registerClass({
         // First find out what space the children require
         let bannerAllocation = null;
         let bannerHeight = 0;
-        let bannerWidth = 0;
         if (this._bannerView.visible) {
             bannerAllocation = this._getBannerAllocation(dialogBox, this._bannerView);
             bannerHeight = bannerAllocation.y2 - bannerAllocation.y1;
-            bannerWidth = bannerAllocation.x2 - bannerAllocation.x1;
         }
 
         let authPromptAllocation = null;
-        let authPromptHeight = 0;
         let authPromptWidth = 0;
         if (this._authPrompt.actor.visible) {
             authPromptAllocation = this._getCenterActorAllocation(dialogBox, this._authPrompt.actor);
-            authPromptHeight = authPromptAllocation.y2 - authPromptAllocation.y1;
             authPromptWidth = authPromptAllocation.x2 - authPromptAllocation.x1;
         }
 
index 50f3c58996027668150edcf71fc45f78a3e2c14b..4ec64edff2b6b9eafc74aa26d681342a8e8be896 100644 (file)
@@ -36,10 +36,10 @@ var Manager = class {
             return;
 
         for (let i = 0; i < realmPaths.length; i++) {
-            let realm = Realm(Gio.DBus.system,
-                              'org.freedesktop.realmd',
-                              realmPaths[i],
-                              this._onRealmLoaded.bind(this));
+            Realm(Gio.DBus.system,
+                  'org.freedesktop.realmd',
+                  realmPaths[i],
+                  this._onRealmLoaded.bind(this));
         }
     }
 
index 89a085d68a768637f576399017e9c01f2f07063c..51272e49c149b6f89feaa92868823c0f331d0dcc 100644 (file)
@@ -162,8 +162,6 @@ function isOutOfDate(extension) {
 }
 
 function createExtensionObject(uuid, dir, type) {
-    let info;
-
     let metadataFile = dir.get_child('metadata.json');
     if (!metadataFile.query_exists(null)) {
         throw new Error('Missing metadata.json');
index 64884162dc1b53753799d8a06ee82e0e42d38707..81fdae0e4be1b7f83d7183f66205ecac6a940986 100644 (file)
@@ -36,7 +36,7 @@ function recursivelyDeleteDir(dir, deleteParent) {
     let children = dir.enumerate_children('standard::name,standard::type',
                                           Gio.FileQueryInfoFlags.NONE, null);
 
-    let info, child;
+    let info;
     while ((info = children.next_file(null)) != null) {
         let type = info.get_file_type();
         let child = dir.get_child(info.get_name());
@@ -57,7 +57,7 @@ function recursivelyMoveDir(srcDir, destDir) {
     if (!destDir.query_exists(null))
         destDir.make_directory_with_parents(null);
 
-    let info, child;
+    let info;
     while ((info = children.next_file(null)) != null) {
         let type = info.get_file_type();
         let srcChild = srcDir.get_child(info.get_name());
index 56b4cc9b4a4c81ecaf9d6da263ebb8642f689c93..cd531d39004b8c9110e7f447472b1f45bbde00e3 100644 (file)
@@ -92,7 +92,6 @@ var ObjectManager = class {
         proxy.init_async(GLib.PRIORITY_DEFAULT,
                          this._cancellable,
                          (initable, result) => {
-               let error = null;
                try {
                    initable.init_finish(result);
                } catch(e) {
@@ -155,7 +154,6 @@ var ObjectManager = class {
     }
 
     _onManagerProxyLoaded(initable, result) {
-        let error = null;
         try {
             initable.init_finish(result);
         } catch(e) {
index 04ea3c49f60ec994a31ddc318b2dffeac15e0be6..2f78fde0700c4f3ad530febfdd28d79ee44561c8 100644 (file)
@@ -136,7 +136,6 @@ let overviewFrames;
 let overviewLatency;
 let mallocUsedSize = 0;
 let overviewShowCount = 0;
-let firstOverviewUsedSize;
 let haveSwapComplete = false;
 let applicationsShowStart;
 let applicationsShowCount = 0;
index e163d6574b9e7663a9fdbdc4ca8c42763ad9f9e2..eae433a69a3cd6da8d1bf52f38abe00f98efb540 100644 (file)
@@ -19,7 +19,6 @@ const PortalHelperSecurityLevel = {
     INSECURE: 2
 };
 
-const INACTIVITY_TIMEOUT = 30000; //ms
 const CONNECTIVITY_CHECK_HOST = 'nmcheck.gnome.org';
 const CONNECTIVITY_CHECK_URI = 'http://' + CONNECTIVITY_CHECK_HOST;
 const CONNECTIVITY_RECHECK_RATELIMIT_TIMEOUT = 30 * GLib.USEC_PER_SEC;
index 0b0bea1ac15dc2c0472c3143b90169ac8a04276b..b5681435ec512874bb05064bbda130a9537251d8 100644 (file)
@@ -841,7 +841,6 @@ class AppSwitcher extends SwitcherPopup.SwitcherList {
                 this._removeIcon(app);
         });
 
-        let n = this._arrows.length;
         let arrow = new St.DrawingArea({ style_class: 'switcher-arrow' });
         arrow.connect('repaint', () => { SwitcherPopup.drawArrow(arrow, St.Side.BOTTOM); });
         this.add_actor(arrow);
index 00019772a0edda4ce598e33536c7c3c3438a0d6a..a06079619b40ac7299dd9b4d6ff5fbb79776a26d 100644 (file)
@@ -20,7 +20,6 @@ const SystemActions = imports.misc.systemActions;
 
 const { loadInterfaceXML } = imports.misc.fileUtils;
 
-var MAX_APPLICATION_WORK_MILLIS = 75;
 var MENU_POPUP_TIMEOUT = 600;
 var MAX_COLUMNS = 6;
 var MIN_COLUMNS = 4;
@@ -34,23 +33,9 @@ var FOLDER_SUBICON_FRACTION = .4;
 
 var MIN_FREQUENT_APPS_COUNT = 3;
 
-var INDICATORS_BASE_TIME = 0.25;
-var INDICATORS_ANIMATION_DELAY = 0.125;
-var INDICATORS_ANIMATION_MAX_TIME = 0.75;
-
 var VIEWS_SWITCH_TIME = 0.4;
 var VIEWS_SWITCH_ANIMATION_DELAY = 0.1;
 
-// Follow iconGrid animations approach and divide by 2 to animate out to
-// not annoy the user when the user wants to quit appDisplay.
-// Also, make sure we don't exceed iconGrid animation total time or
-// views switch time.
-var INDICATORS_BASE_TIME_OUT = 0.125;
-var INDICATORS_ANIMATION_DELAY_OUT = 0.0625;
-var INDICATORS_ANIMATION_MAX_TIME_OUT =
-    Math.min (VIEWS_SWITCH_TIME,
-              IconGrid.ANIMATION_TIME_OUT + IconGrid.ANIMATION_MAX_DELAY_OUT_FOR_ITEM);
-
 var PAGE_SWITCH_TIME = 0.3;
 
 const SWITCHEROO_BUS_NAME = 'net.hadess.SwitcherooControl';
@@ -373,7 +358,7 @@ var AllView = class AllView extends BaseAppView {
     _loadApps() {
         this._appInfoList = Shell.AppSystem.get_default().get_installed().filter(appInfo => {
             try {
-                let id = appInfo.get_id(); // catch invalid file encodings
+                (appInfo.get_id()); // catch invalid file encodings
             } catch(e) {
                 return false;
             }
index 2a404ae9b6c37cf594fe4b02f79481adbbc82661..6ce0d6093c8decb93c1cc69c033eab539b5d2f03 100644 (file)
@@ -108,7 +108,6 @@ const PRIMARY_COLOR_KEY = 'primary-color';
 const SECONDARY_COLOR_KEY = 'secondary-color';
 const COLOR_SHADING_TYPE_KEY = 'color-shading-type';
 const BACKGROUND_STYLE_KEY = 'picture-options';
-const PICTURE_OPACITY_KEY = 'picture-opacity';
 const PICTURE_URI_KEY = 'picture-uri';
 
 var FADE_ANIMATION_TIME = 1.0;
index d7c5bc80543b15962aa74336e81459bc0e6d592c..4996cfc3015047aed54fada53b026822693eff4a 100644 (file)
@@ -546,8 +546,6 @@ var Calendar = class Calendar {
         this._calendarBegin = new Date(beginDate);
         this._markedAsToday = now;
 
-        let year = beginDate.getYear();
-
         let daysToWeekStart = (7 + beginDate.getDay() - this._weekStart) % 7;
         let startsOnWeekStart = daysToWeekStart == 0;
         let weekPadding = startsOnWeekStart ? 7 : 0;
@@ -559,7 +557,7 @@ var Calendar = class Calendar {
         let row = 2;
         // nRows here means 6 weeks + one header + one navbar
         let nRows = 8;
-        while (row < 8) {
+        while (row < nRows) {
             // xgettext:no-javascript-format
             let button = new St.Button({ label: iter.toLocaleFormat(C_("date day number format", "%d")),
                                          can_focus: true });
index dca8318ede62b452d40713b711da03bc0ef2d7b8..892e6ca4de80cc8d2a9cebe3dd16cf45dee33fa3 100644 (file)
@@ -236,7 +236,6 @@ class NetworkSecretDialog extends ModalDialog.ModalDialog {
 
     _get8021xSecrets(secrets) {
         let ieee8021xSetting = this._connection.get_setting_802_1x();
-        let phase2method;
 
         /* If hints were given we know exactly what we need to ask */
         if (this._settingName == "802-1x" && this._hints.length) {
@@ -696,7 +695,6 @@ var NetworkAgent = class {
             break;
         case 'gsm':
             if (hints.includes('pin')) {
-                let gsmSetting = connection.get_setting_gsm();
                 title = _("PIN code required");
                 body = _("PIN code is needed for the mobile broadband device");
                 break;
index 338080fc479b7f5baa349b69cd3277807bbe091e..a075ca151f693484edbccd18ff638644fea4a873 100644 (file)
@@ -7,7 +7,6 @@ const SwitcherPopup = imports.ui.switcherPopup;
 const Params = imports.misc.params;
 
 var POPUP_APPICON_SIZE = 96;
-var POPUP_FADE_TIME = 0.1; // seconds
 
 var SortGroup = {
     TOP:    0,
index 4e8ce7d24271228290341957b6754c33853a94cb..fad27cfd2a2f44f95b4ad45015662d5f6477b12e 100644 (file)
@@ -459,7 +459,6 @@ class CalendarColumnLayout extends Clutter.BoxLayout {
 var DateMenuButton = GObject.registerClass(
 class DateMenuButton extends PanelMenu.Button {
     _init() {
-        let item;
         let hbox;
         let vbox;
 
index 3c7729eb3cfe681660b8de7653d0e2b312ae8191..cdba84c03e0a895e28c695cd1fd062d9aeceded6 100644 (file)
@@ -29,13 +29,9 @@ const UserWidget = imports.ui.userWidget;
 
 const { loadInterfaceXML } = imports.misc.fileUtils;
 
-let _endSessionDialog = null;
-
 const _ITEM_ICON_SIZE = 48;
 const _DIALOG_ICON_SIZE = 48;
 
-var GSM_SESSION_MANAGER_LOGOUT_FORCE = 2;
-
 const EndSessionDialogIface = loadInterfaceXML('org.gnome.SessionManager.EndSessionDialog');
 
 const logoutDialogContent = {
@@ -223,7 +219,7 @@ function init() {
     // This always returns the same singleton object
     // By instantiating it initially, we register the
     // bus object, etc.
-    _endSessionDialog = new EndSessionDialog();
+    (new EndSessionDialog());
 }
 
 var EndSessionDialog = GObject.registerClass(
index dbbd102371d912c981ca6edbefd522c1598a8e4a..d86ae92afed8269f1483571cac00a7f74513fd22 100644 (file)
@@ -9,8 +9,6 @@ const ExtensionSystem = imports.ui.extensionSystem;
 const FileUtils = imports.misc.fileUtils;
 const ModalDialog = imports.ui.modalDialog;
 
-const _signals = ExtensionSystem._signals;
-
 var REPOSITORY_URL_BASE = 'https://extensions.gnome.org';
 var REPOSITORY_URL_DOWNLOAD = REPOSITORY_URL_BASE + '/download-extension/%s.shell-extension.zip';
 var REPOSITORY_URL_INFO     = REPOSITORY_URL_BASE + '/extension-info/';
index a6774edb1907f47fdec96772a986c0a76fdf20e4..8e5c9c60afb9e0ab68ced5ff4e9b82834c4eccbf 100644 (file)
@@ -743,7 +743,6 @@ var IconGrid = GObject.registerClass({
         this._fixedHItemSize = this._hItemSize;
         this._fixedVItemSize = this._vItemSize;
         this._updateSpacingForSize(availWidth, availHeight);
-        let spacing = this._getSpacing();
 
         if (this.columnsForWidth(availWidth) < this._minColumns || this.rowsForHeight(availHeight) < this._minRows) {
             let neededWidth = this.usedWidthForNColumns(this._minColumns) - availWidth ;
@@ -802,7 +801,6 @@ var PaginatedIconGrid = GObject.registerClass({
         }
         let children = this._getVisibleChildren();
         let availWidth = box.x2 - box.x1;
-        let availHeight = box.y2 - box.y1;
         let spacing = this._getSpacing();
         let [nColumns, usedWidth] = this._computeLayout(availWidth);
 
@@ -821,7 +819,6 @@ var PaginatedIconGrid = GObject.registerClass({
         let x = box.x1 + leftEmptySpace + this.leftPadding;
         let y = box.y1 + this.topPadding;
         let columnIndex = 0;
-        let rowIndex = 0;
 
         for (let i = 0; i < children.length; i++) {
             let childBox = this._calculateChildBox(children[i], x, y, box);
@@ -831,7 +828,6 @@ var PaginatedIconGrid = GObject.registerClass({
             columnIndex++;
             if (columnIndex == nColumns) {
                 columnIndex = 0;
-                rowIndex++;
             }
             if (columnIndex == 0) {
                 y += this._getVItemSize() + spacing;
@@ -863,7 +859,6 @@ var PaginatedIconGrid = GObject.registerClass({
         if (this._rowLimit)
             nRows = Math.min(nRows, this._rowLimit);
 
-        let spacing = this._getSpacing();
         // We want to contain the grid inside the parent box with padding
         this._rowsPerPage = this.rowsForHeight(availHeightPerPage);
         this._nPages = Math.ceil(nRows / this._rowsPerPage);
index c30f90a76ec4f7c87b098968f4e71dcfb0acc30a..2a096f2c1de6effd3037dd6cf7ffb5b6c2846d09 100644 (file)
@@ -405,9 +405,6 @@ var Key = class Key {
             return Clutter.EVENT_PROPAGATE;
         });
         button.connect('touch-event', (actor, event) => {
-            let device = event.get_device();
-            let sequence = event.get_event_sequence();
-
             // We only handle touch events here on wayland. On X11
             // we do get emulated pointer events, which already works
             // for single-touch cases. Besides, the X11 passive touch grab
@@ -913,7 +910,6 @@ var EmojiSelection = class EmojiSelection {
             contents = imports.byteArray.toString(contents);
         let emoji = JSON.parse(contents);
 
-        let pages = [];
         let variants = [];
         let currentKey = 0;
         let currentSection = null;
@@ -1406,8 +1402,6 @@ var Keyboard = class Keyboard {
     }
 
     _getDefaultKeysForRow(row, numRows, level) {
-        let pre, post;
-
         /* The first 2 rows in defaultKeysPre/Post belong together with
          * the first 2 rows on each keymap. On keymaps that have more than
          * 4 rows, the last 2 default key rows must be respectively
@@ -1646,8 +1640,7 @@ var Keyboard = class Keyboard {
     }
 
     _windowSlideAnimationComplete(window, delta) {
-        // Synchronize window and actor positions again.
-        let windowActor = window.get_compositor_private();
+        // Synchronize window positions again.
         let frameRect = window.get_frame_rect();
         frameRect.y += delta;
         window.move_frame(true, frameRect.x, frameRect.y);
@@ -1693,7 +1686,6 @@ var Keyboard = class Keyboard {
 
         if (window && monitor) {
             let keyboardHeight = Main.layoutManager.keyboardBox.height;
-            let focusObscured = false;
 
             if (y + h >= monitor.y + monitor.height - keyboardHeight) {
                 if (this._keyboardVisible)
@@ -1744,7 +1736,6 @@ var KeyboardController = class {
     }
 
     _onContentPurposeHintsChanged(method) {
-        let hints = method.content_hints;
         let purpose = method.content_purpose;
         let emojiVisible = false;
         let keypadVisible = false;
index 958211df06009cf512c1b9bb6a422f58132cf408..3149cf4212e99280af182c046c5bb30c00457049 100644 (file)
@@ -394,7 +394,6 @@ var ObjInspector = class ObjInspector {
 
             for (let i = 0; i < properties.length; i++) {
                 let propName = properties[i];
-                let valueStr;
                 let link;
                 try {
                     let prop = obj[propName];
@@ -403,7 +402,6 @@ var ObjInspector = class ObjInspector {
                     link = new St.Label({ text: '<error>' });
                 }
                 let hbox = new St.BoxLayout();
-                let propText = propName + ': ' + valueStr;
                 hbox.add(new St.Label({ text: propName + ': ' }));
                 hbox.add(link);
                 this._container.add_actor(hbox);
@@ -710,7 +708,6 @@ var Extensions = class Extensions {
 
         let metaBox = new St.BoxLayout({ style_class: 'lg-extension-meta' });
         box.add(metaBox);
-        let stateString = this._stateToString(extension.state);
         let state = new St.Label({ style_class: 'lg-extension-state',
                                    text: this._stateToString(extension.state) });
         metaBox.add(state);
index 289cd189861e5000cdb592ab7a72930277616d4d..fca06e206a349011537f73307c348586ff5bf771 100644 (file)
@@ -41,8 +41,6 @@ const CROSS_HAIRS_OPACITY_KEY   = 'cross-hairs-opacity';
 const CROSS_HAIRS_LENGTH_KEY    = 'cross-hairs-length';
 const CROSS_HAIRS_CLIP_KEY      = 'cross-hairs-clip';
 
-let magDBusService = null;
-
 var MouseSpriteContent = GObject.registerClass({
     Implements: [ Clutter.Content ],
 }, class MouseSpriteContent extends GObject.Object {
@@ -122,7 +120,7 @@ var Magnifier = class Magnifier {
         });
 
         // Export to dbus.
-        magDBusService = new MagnifierDBus.ShellMagnifier();
+        (new MagnifierDBus.ShellMagnifier());
         this.setActive(St.Settings.get().magnifier_active);
     }
 
@@ -1818,9 +1816,7 @@ var Crosshairs = class Crosshairs {
     reCenter(clipSize) {
         let [groupWidth, groupHeight] = this._actor.get_size();
         let leftLength = this._horizLeftHair.get_width();
-        let rightLength = this._horizRightHair.get_width();
         let topLength = this._vertTopHair.get_height();
-        let bottomLength = this._vertBottomHair.get_height();
         let thickness = this._horizLeftHair.get_height();
 
         // Deal with clip rectangle.
index 9b69860010798545a9004ba5de20fa5dd25b5c3a..abd83721c0b985ace442510481e2dcd00a03353e 100644 (file)
@@ -84,7 +84,6 @@ let _cssStylesheet = null;
 let _a11ySettings = null;
 let _themeResource = null;
 let _oskResource = null;
-let pointerA11yTimeout = null;
 
 function _sessionUpdated() {
     if (sessionMode.isPrimary)
@@ -192,7 +191,7 @@ function _initializeUI() {
     layoutManager.init();
     overview.init();
 
-    pointerA11yTimeout = new PointerA11yTimeout.PointerA11yTimeout();
+    (new PointerA11yTimeout.PointerA11yTimeout());
 
     _a11ySettings = new Gio.Settings({ schema_id: A11Y_SCHEMA });
 
index 62feacede39674c7c0cdcdc18e9faf785a2513e1..4c53297b1a1e9d8814937c04983d65b6bf600484 100644 (file)
@@ -4,8 +4,6 @@ const { Clutter, Gio, Meta, St } = imports.gi;
 
 const Main = imports.ui.main;
 
-var FADE_TIME = 0.1;
-
 var OsdMonitorLabel = class {
     constructor(monitor, label) {
         this._actor = new St.Widget({ x_expand: true,
index d9309415b3307f7fa921e81ac3ebbf91bd33e777..6ec379899ae69a34f8f990a84547a381e76843d2 100644 (file)
@@ -3,8 +3,6 @@ const Tweener = imports.ui.tweener;
 const Main = imports.ui.main;
 const Cairo = imports.cairo;
 
-const ANIMATION_STEPS = 36.;
-
 var PieTimer = GObject.registerClass(
 class PieTimer extends St.DrawingArea {
     _init() {
index 8c5cd07920bccb35e17bb3a75a0f11f9c9b6975d..109bbd91d5bde0b11d7741a0db4e1f1cb18e0749 100644 (file)
@@ -9,8 +9,6 @@ const Tweener = imports.ui.tweener;
 const Util = imports.misc.util;
 const History = imports.misc.history;
 
-var MAX_FILE_DELETED_BEFORE_INVALID = 10;
-
 const HISTORY_KEY = 'command-history';
 
 const LOCKDOWN_SCHEMA = 'org.gnome.desktop.lockdown';
index a005a206be89d271c54f2a2f0e4005e52c347d48..0c3c00d19293067ab72e336684e9618e5bdaf0e0 100644 (file)
@@ -44,11 +44,9 @@ var SUMMARY_ICON_SIZE = 48;
 // - STANDARD_FADE_TIME is used when the session goes idle
 // - MANUAL_FADE_TIME is used for lowering the shield when asked by the user,
 //   or when cancelling the dialog
-// - BACKGROUND_FADE_TIME is used when the background changes to crossfade to new background
 // - CURTAIN_SLIDE_TIME is used when raising the shield before unlocking
 var STANDARD_FADE_TIME = 10;
 var MANUAL_FADE_TIME = 0.3;
-var BACKGROUND_FADE_TIME = 1.0;
 var CURTAIN_SLIDE_TIME = 0.3;
 
 var Clock = class {
index f9fa7320b664c53d82da7853d3a6b641f4ae59c2..3c1b35e05ea2173dc44b9f02b2a97e265fdf491c 100644 (file)
@@ -42,8 +42,6 @@ var Slider = class extends BarLevel.BarLevel {
         let [hasHandleColor, handleBorderColor] =
             themeNode.lookup_color('-slider-handle-border-color', false);
 
-        const TAU = Math.PI * 2;
-
         let handleX = handleRadius + (width - 2 * handleRadius) * this._value / this._maxValue;
         let handleY = height / 2;
 
@@ -185,10 +183,9 @@ var Slider = class extends BarLevel.BarLevel {
     }
 
     _moveHandle(absX, absY) {
-        let relX, relY, sliderX, sliderY;
-        [sliderX, sliderY] = this.actor.get_transformed_position();
+        let relX, sliderX;
+        [sliderX] = this.actor.get_transformed_position();
         relX = absX - sliderX;
-        relY = absY - sliderY;
 
         let width = this._barLevelWidth;
         let handleRadius = this.actor.get_theme_node().get_length('-slider-handle-radius');
index cc270500b4658f748230aa5480c272238dadb1e5..8133c3276f23c50e44eaf2beac4139ceb5fc5def 100644 (file)
@@ -10,8 +10,6 @@ const Slider = imports.ui.slider;
 
 const ALLOW_AMPLIFIED_VOLUME_KEY = 'allow-volume-above-100-percent';
 
-var VOLUME_NOTIFY_ID = 1;
-
 // Each Gvc.MixerControl is a connection to PulseAudio,
 // so it's better to make it a singleton
 let _mixerControl;
index a11b34b02e89d804585bcbd2a69f15ec5167f564..09f74707a2f3572b9d637fbb4f381f2950f06d9e 100644 (file)
@@ -2,7 +2,7 @@
 //
 // A widget showing the user avatar and name
 
-const { Clutter, Gio, GLib, GObject, St } = imports.gi;
+const { Clutter, GLib, GObject, St } = imports.gi;
 
 const Params = imports.misc.params;
 
@@ -44,7 +44,6 @@ var Avatar = class {
             iconFile = null;
 
         if (iconFile) {
-            let file = Gio.File.new_for_path(iconFile);
             this.actor.child = null;
             this.actor.style = `
                 background-image: url("${iconFile}");
@@ -107,9 +106,6 @@ class UserWidgetLabel extends St.Widget {
         let [minRealNameWidth, minRealNameHeight,
              natRealNameWidth, natRealNameHeight] = this._realNameLabel.get_preferred_size();
 
-        let [minUserNameWidth, minUserNameHeight,
-             natUserNameWidth, natUserNameHeight] = this._userNameLabel.get_preferred_size();
-
         if (natRealNameWidth <= availWidth)
             this._currentLabel = this._realNameLabel;
         else
index 77146552db2e1fe0aeed6855f5be74048ea3df81..a46cb4cce295f052d60744609e79cad4cf143438 100644 (file)
@@ -403,7 +403,6 @@ var ViewSelector = class {
         if (Main.modalCount > 1)
             return Clutter.EVENT_PROPAGATE;
 
-        let modifiers = event.get_state();
         let symbol = event.get_key_symbol();
 
         if (symbol == Clutter.Escape) {
index d016f33716ecab8037c1b633f8b8378e2d5b1dda..a25da99648e24f6c6e693a8f004b9fabb962bbc8 100644 (file)
@@ -331,7 +331,6 @@ var WorkspaceTracker = class {
         if (oldNumWorkspaces == newNumWorkspaces)
             return false;
 
-        let lostWorkspaces = [];
         if (newNumWorkspaces > oldNumWorkspaces) {
             let w;
 
index 1b6c63eb39200ed46ebd97a5241c0bff59565c9f..16c0e188c477cd789443fd91c67175ecbb62406b 100644 (file)
@@ -1002,7 +1002,6 @@ var UnalignedLayoutStrategy = class extends LayoutStrategy {
         let idealRowWidth = totalWidth / numRows;
         let windowIdx = 0;
         for (let i = 0; i < numRows; i++) {
-            let col = 0;
             let row = this._newRow();
             rows.push(row);
 
@@ -1363,7 +1362,6 @@ var Workspace = class {
 
         for (let i = 0; i < clones.length; i++) {
             let clone = clones[i];
-            let metaWindow = clone.metaWindow;
             if (i == 0) {
                 clone.setStackAbove(this._dropRect);
             } else {
index be196c04bca1a2b43548ce13e034b4557a8f02ce..765f80146e5b9339f8d8c98527a97f7faf82c605 100644 (file)
@@ -324,7 +324,6 @@ var WorkspaceThumbnail = class {
 
         for (let i = 0; i < this._windows.length; i++) {
             let clone = this._windows[i];
-            let metaWindow = clone.metaWindow;
             if (i == 0) {
                 clone.setStackAbove(this._bgManager.backgroundActor);
             } else {
@@ -914,7 +913,6 @@ class ThumbnailsBox extends St.Widget {
         let workspaceManager = global.workspace_manager;
         let oldNumWorkspaces = validThumbnails.length;
         let newNumWorkspaces = workspaceManager.n_workspaces;
-        let active = workspaceManager.get_active_workspace_index();
 
         if (newNumWorkspaces > oldNumWorkspaces) {
             this.addThumbnails(oldNumWorkspaces, newNumWorkspaces - oldNumWorkspaces);
@@ -1248,7 +1246,7 @@ class ThumbnailsBox extends St.Widget {
             if (i == this._dropPlaceholderPos) {
                 let [minHeight, placeholderHeight] = this._dropPlaceholder.get_preferred_height(-1);
                 childBox.x1 = x1;
-                childBox.x2 = x1 + thumbnailWidth;
+                childBox.x2 = x2;
                 childBox.y1 = Math.round(y);
                 childBox.y2 = Math.round(y + placeholderHeight);
                 this._dropPlaceholder.allocate(childBox, flags);
index 78a1c8104aac0eeafa22cd6e0a158aa9e3e655d4..fe16ae8cdb73263fc413574990471b7874a3d32e 100644 (file)
@@ -246,7 +246,6 @@ var WorkspacesView = class extends WorkspacesViewBase {
 
         this.scrollAdjustment.upper = newNumWorkspaces;
 
-        let needsUpdate = false;
         for (let j = 0; j < newNumWorkspaces; j++) {
             let metaWorkspace = workspaceManager.get_workspace_by_index(j);
             let workspace;